﻿using System.Collections.Generic;
using System.Text.Json.Serialization;
using System;

namespace TyMES.Communication.Request
{
    public class UploadProductData006Requset
    {
        [JsonPropertyName("data")]
        public List<ProductionData> ProductionDataList { get; set; }

        [JsonPropertyName("factoryCode")]
        public string FactoryCode { get; set; }

        [JsonPropertyName("mesUrl")]
        public string MesUrl { get; set; }

        [JsonPropertyName("mesVersion")]
        public string MesVersion { get; set; }

        [JsonPropertyName("remote")]
        public string Remote { get; set; }

        [JsonPropertyName("requestTime")]
        public DateTime RequestTime { get; set; }

        [JsonPropertyName("serviceId")]
        public string ServiceId { get; set; }

        [JsonPropertyName("timer")]
        public long Timer { get; set; }

        [JsonPropertyName("uuid")]
        public string Uuid { get; set; }

    }

    public class ProductionData
    {
        [JsonPropertyName("data")]
        public List<ProductDataItem> DataList { get; set; }

        [JsonPropertyName("lineCode")]
        public string LineCode { get; set; }

        [JsonPropertyName("machineCode")]
        public string MachineCode { get; set; }

        [JsonPropertyName("materialCode")]
        public string MaterialCode { get; set; }

        [JsonPropertyName("materialVersion")]
        public string MaterialVersion { get; set; }

        [JsonPropertyName("resultFlag")]
        public string ResultFlag { get; set; }

        [JsonPropertyName("snNumber")]
        public string SnNumber { get; set; }

        [JsonPropertyName("stationCode")]
        public string StationCode { get; set; }
    }

    public class ProductDataItem
    {
        [JsonPropertyName("checkResult")]
        public int CheckResult { get; set; }

        [JsonPropertyName("paramCode")]
        public string ParamCode { get; set; }

        [JsonPropertyName("paramName")]
        public string ParamName { get; set; }

        [JsonPropertyName("paramTime")]
        public long ParamTime { get; set; } 

        [JsonPropertyName("realValue")]
        public string RealValue { get; set; }
    }
}
